import { BufferGeometry3D, Vector3 } from 'feng3d-three';
import { StrokeStyle, SVGLoader } from '../thirdparty/three/imports';

export class SVGLoader3D
{
    static getStrokeStyle(width?: number, color?: string, lineJoin?: string, lineCap?: string, miterLimit?: number)
    {
        const result = SVGLoader.getStrokeStyle(width, color, lineJoin, lineCap, miterLimit);

        return result;
    }

    static pointsToStroke(points: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number)
    {
        const result = SVGLoader.pointsToStroke(points, style, arcDivisions, minDistance);

        const bufferGeometry3D = BufferGeometry3D.get(result);

        return bufferGeometry3D;
    }
}
